import request from "@/api/index"

export default {
  /**
   * @description: 添加基地 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  add (params) {
    const url = "base/homeBase/add"
    return request.post(url, params)
  },
  /**
   * @description: 修改基地 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  edit (params) {
    const url = "base/homeBase/edit"
    return request.post(url, params)
  },
  /**
   * @description: 单个删除基地 *代表必填
   * @param {String/Number} id *
   * @return {Object}
   */
  delById (params) {
    const url = "base/homeBase/delById"
    return request.get(url, params)
  },
  /**
   * @description: 批量删除基地 *代表必填
   * @param {Object} id *
   * @return {Object}
   */
  delListById (params) {
    const url = "base/homeBase/delListById"
    return request.get(url, params)
  },
  /**
   * @description: 根据员工Id查询该员工基地权限(数组) *代表必填
   * @param {Object} staffId *
   * @return {Object}
   */
  queryByUserId (params) {
    const url = "/base/homeBase/queryByUserId"
    return request.get(url, params)
  },
  /**
   * @description: 根据员工Id查询该员工基地权限(树形) *代表必填
   * @param {Object} staffId *
   * @return {Object}
   */
  queryTree (params) {
    const url = "base/homeBase/queryTree"
    return request.get(url, params)
  },
  /**
   * @description: 分页查询基地 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
  queryPageByCondition (params) {
    const url = "base/homeBase/queryPageByCondition"
    return request.post(url, params)
  },
  /**
   * @description: 查询基地 *代表必填
   * @param {Object} params *
   * @return {Object}
   */
  queryByCondition (params) {
    const url = "base/homeBase/queryByCondition"
    return request.post(url, params)
  },
  // 
  /**
   * @description: 获取当前登录基地的养殖类型 *代表必填
   * @param {Object} params *
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @return {Object}
   */
  getBreedTypeNo (params) {
    const url = "base/homeBase/getBreedTypeNo"
    return request.get(url, params)
  },
  saveSort(idList = []) {
    const url = "/base/homeBase/saveSort"
    return request.post(url, idList)
  },

}
